#
# Copyright (C) [2024] Xingyun Integrated Circuit, Inc.
#
# GreenCode was a private technology asset of Xingyun Integrated Circuit， Inc （Confidential）
# Author: Shawn.Tan
# Date: 2025.10.28
#
# History: Initial Version 2025.10.28
#
#
from gpgpu.EnvGPGPU import EnvGPGPU
from gpgpu.GenThreadGPGPU import GenThreadGPGPU

from base.Sequence import Sequence


class MainSequence(Sequence):
    def generate(self, **kargs):
        self.genInstruction("FENCE##CALM", {"NoSkip": 1})
        self.genInstruction("FENCE##CALM", {"fm": 0x8, "pred": 0xF, "succ": 0xD, "NoSkip": 1})
        self.genInstruction("FENCE.I##CALM", {"NoSkip": 1})
        self.genInstruction("FENCE.I##CALM", {"rd": 0x1, "rs": 0x2, "NoSkip": 1})


## Points to the MainSequence defined in this file
MainSequenceClass = MainSequence

## Using GenThreadGPGPU by default, can be overriden with extended classes
GenThreadClass = GenThreadGPGPU

## Using EnvGPGPU by default, can be overriden with extended classes
EnvClass = EnvGPGPU
